package cn.com.xf.task;

import java.util.Date;
import java.util.concurrent.Callable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import cn.com.xf.dao.TbempinfoDAO;

@Component
public class AnalyzeCallable implements Callable<Integer> {

	@Autowired
	private TbempinfoDAO tbempinfoDAO;
	
	private String[] userids;
	private Date startDate;
	private Date endDate;
	
	public AnalyzeCallable(String[] userids, Date startDate, Date endDate) {
		this.userids = userids;
		this.startDate = startDate;
		this.endDate = endDate;
	}

	@Override
	public Integer call() throws Exception {
		for (String userid: userids) {
			System.out.println(userid);
			System.out.println(tbempinfoDAO.selectEmpBySiteid("769000").size());
		}
		return 1;
	}

}
